aux_source_directory(. DIR_LIB_SRCS)

set(HEADER_FILES
	hexparser.h
	iniparser.h
	dictionary.h
)

include_directories (
    ${PROJECT_SOURCE_DIR}/src/
)

add_library(fileparser SHARED ${DIR_LIB_SRCS})

target_include_directories (fileparser INTERFACE
    $<INSTALL_INTERFACE:src/>
    $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/>
)

#target_link_libraries(fileparser PUBLIC ${CMAKE_CURRENT_BINARY_DIR})


install(TARGETS fileparser EXPORT ${EXPORT_TARGETS_NAME}TARGETS
    DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/
    PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
    COMPONENT core
)

install(FILES ${HEADER_FILES}
    DESTINATION ${CMAKE_INSTALL_PREFIX}/include/fileparser
    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
